package cn.sdack.go.common.entities.users;

import cn.sdack.go.common.entities.PermissionEntity;
import jakarta.persistence.*;
import lombok.*;

/**
 * 角色
 * @author sdack
 * @date 2024/1/8
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Entity
@Table(name = "role_authority", indexes = {
        @Index(name = "idx_role_authority",columnList = "roleCode,authorityCode")
})
public class RoleAuthorityEntity extends PermissionEntity {

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Long id;

    // 英文标签
    @Column(length = 50, nullable = false)
    private String roleCode;

    // 英文标签
    @Column(length = 150, nullable = false)
    private String authorityCode;

}
